package com.songshuai.webapi.login.config;

import com.songshuai.webapi.common.redis.RedisUtil;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;

import javax.annotation.Resource;

/**
 * Created by yubo on 3/12/2018.
 */
@Configuration
public class BeanConfig {

    @Resource
    RedisTemplate redisTemplate;

    @Bean
    public RedisUtil redisUtil() {
        RedisUtil redisUtil = new RedisUtil();
        redisUtil.setRedisTemplate(redisTemplate);
        return redisUtil;
    }
}
